﻿using RBAC.MaHaiBo.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.MaHaiBo.Service
{
    /// <summary>
    /// 角色菜单关联 服务层接口
    /// </summary>
    public interface IMenuRoleService
    {
        /// <summary>
        /// 树形角色列表
        /// </summary>
        /// <returns>返回数据集合</returns>
        Task<List<Tmeen>> GetRole();
        /// <summary>
        /// 树形菜单列表
        /// </summary>
        /// <returns>返回数据集合</returns>
        Task<List<Tmeen>> GetMenu(int Pid);
        /// <summary>
        /// 添加角色菜单关联
        /// </summary>
        /// <param name="Rid">角色</param>
        /// <param name="Mid">菜单编号集合</param>
        /// <returns>返回受影响行数</returns>
        Task<int>AddMenuRole(int Rid,List<int> Mid);
        /// <summary>
        /// 根据角色编号查询角色菜单关联中的菜单
        /// </summary>
        /// <param name="Rid">角色</param>
        /// <returns>返回根据角色编号查询角色菜单关联中的菜单的编号</returns>
        Task<List<int>> BackillMenuRole(int Rid);

    }
}
